﻿using Dict.Config;
using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Battle.Engine.LogicModel
{
    public class BuffOfDispel : Buff {
       
        public override Buff Clone()
        {
            var newBuff = base.Clone() as BuffOfDispel;
            return newBuff;
        }
        public override void Init(TableBuff tableBuff, EngineData engineData)
        {
            base.Init(tableBuff, engineData);
        }

        public override void LoadBuff0()
        {
            
        }

        public override void UnloadBuff0()
        {
            
        }


        public override void Effect()
        {
            switch (this.factor)
            {
                case TableFactorConst.clearOneBuff:
                    this.buffTargetActor.buffManager.Dispel(false, 1);
                    break;
                case TableFactorConst.clearAllBuff:
                    this.buffTargetActor.buffManager.Dispel(false);
                    break;
                case TableFactorConst.clearOneDebuff:
                    this.buffTargetActor.buffManager.Dispel(true, 1);
                    break;
                case TableFactorConst.clearAllDebuff:
                    this.buffTargetActor.buffManager.Dispel(true);
                    break;
                default:
                    break;

            }
        }

        public override void UnEffect()
        {
            //被清除的buff无法回退
        }


    }
}
